#ifndef __GOFGAME_DUNGEONKEEPER_UI_STRATEGIC_OPERATION_VIEW_H__
#define __GOFGAME_DUNGEONKEEPER_UI_STRATEGIC_OPERATION_VIEW_H__

#include "gofgame/common/ui/Container.h"
#include "gofgame/common/ui/Button.h"
#include "gofgame/dungeonkeeper/ui/StrategicDataView.h"
#include "gofgame/dungeonkeeper/ui/SkillUpgradeEventArgs.h"
#include "gofgame/dungeonkeeper/ui/UnitUpgradeEventArgs.h"
#include "gofgame/dungeonkeeper/ui/ProduceUpgradeEventArgs.h"

namespace gofgame {
	namespace dungeonkeeper {
		namespace ui {

			using namespace gofgame::common::ui;

			class StrategicOperationView : public Container {
			public:
				StrategicOperationView();
				virtual bool init() _override;
				declare_event(event_handler<SkillUpgradeEventArgs>, skillUpgrade, _skillUpgrade);
				declare_event(event_handler<UnitUpgradeEventArgs>, unitUpgrade, _unitUpgrade);
				declare_event(event_handler<ProduceUpgradeEventArgs>, produceUpgrade, _produceUpgrade);

			protected:
				virtual void onDispatchManualBubbleEvent(ManualBubbleEventArgs &e) _override;
				virtual void onSkillUpgrade(SkillUpgradeEventArgs &e);
				virtual void onUnitUpgrade(UnitUpgradeEventArgs &e);
				virtual void onProduceUpgrade(ProduceUpgradeEventArgs &e); 

			private:
				void backButton_click(void *sender, ComponentEventArgs &e);
				Ref<StrategicDataView> strategicDataView;
				Ref<Button> backButton;
				event_handler<SkillUpgradeEventArgs> _skillUpgrade;
				event_handler<UnitUpgradeEventArgs> _unitUpgrade;
				event_handler<ProduceUpgradeEventArgs> _produceUpgrade;
			};
		}
	}
}

#endif //__GOFGAME_DUNGEONKEEPER_UI_STRATEGIC_OPERATION_VIEW_H__
